package com.heima.admin.controller.v1;

import com.heima.admin.service.AdUserService;
import com.heima.model.admin.dtos.AdUserLoginDto;
import com.heima.model.common.dtos.ResponseResult;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Author: Administrator
 * CreateTime: 2024/10/9
 * Project: heima-leadnews
 */
@RestController
@RequestMapping("/login")
@RequiredArgsConstructor
public class LoginController {

    private final AdUserService adUserService;

    @PostMapping("/in")
    public ResponseResult login(@RequestBody AdUserLoginDto loginDto){
        return adUserService.login(loginDto);
    }
}
